package eclipse1;

public class Dog extends Animal{

    void feed(){
        if(full == 100){
            System.out.println(this.name+"吃不下了");
            return;// 方法结束
        }
        System.out.println("给"+this.name+"喂食");
        this.full += 10;
        System.out.println("饱食度:"+ full);
    }
    void play(){
        if(this.full == 0){
            System.out.println(this.name+"饿的玩不动了");
            return;
        }
        System.out.println("陪"+this.name+"玩耍");
        this.full -= 10;
        this.happy += 10;
        System.out.println("饱食度:"+ this.full + "快乐度" + happy);
    }
    void punish(){
        System.out.println("打"+this.name+"的pp,"+this.name+"哭叫：旺~");
        this.happy -= 10;
        System.out.println("快乐度" + this.happy);
    }
}
